/*
 * =====================================================================================
 *
 *       Filename:  equipment.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  01/23/2018 02:32:43 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  jianxi sun (jianxi), ycsunjane@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#ifndef __EQUIPMEN_H__
#define __EQUIPMEN_H__
#include <ev.h>
#include "socks5.h"
#include "uthash/include/uthash.h"

typedef struct equipment {
	/* hash key */
	char username[SOCKS5_AUTH_USERNAMEPASSWORD_MAX_LEN];
	char password[SOCKS5_AUTH_USERNAMEPASSWORD_MAX_LEN];
	UT_hash_handle hh;
} equipment_t;
extern equipment_t *equipmentlist;

equipment_t *find_equipment_raw(const char * const username, char *password);
int equipment_unbind(const char * const username, char *password);
int equipment_bind(const char * const username, char *password);
#endif /* __EQUIPMEN_H__ */
